<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>
  //题一：
  // debugger;
  // var x = 1;
  // function func(x, y = function anonymousl() {x = 2}){
  //   x = 3;
  //   y();
  //   console.log(x);
  // }
  // func(5);
  // console.log(x);
  //题二：
  var x = 1;
  function func(x, y = function anonymousl() {x = 2}){
    var x = 3;
    y();
    console.log(x);
  }
  func(5);
  console.log(x);

</script>
</html>